package org.agile2soft.nexoma.core.tapestry.pages.profile;

import org.agile2soft.nexoma.core.entity.Profile;
import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.beaneditor.BeanModel;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.BeanModelSource;

import br.com.arsmachina.tapestrycrud.Constants;
import br.com.arsmachina.tapestrycrud.base.BaseListPage;

@SuppressWarnings("unused")
public class ListProfile extends BaseListPage<Profile,Integer> {

    @Inject
    private BeanModelSource beanModelSource;

    @Inject
    private Messages messages;

    @Override
    public BeanModel<Profile> getBeanModel() {
        BeanModel<Profile> beanModel = super.getBeanModel();
        beanModel.exclude("id");
        return beanModel;
    }

    @OnEvent(component=Constants.REMOVE_COMPONENT_ID,value=EventConstants.ACTION)
    public Object remove(Integer id) {
        return remove(id);
    }

}
